home *** CD-ROM | disk | FTP | other *** search
/ Champak 120 / Vol 120.iso / games / asteroid.swf / scripts / __Packages / com / evilfree / astroidsRevenge / BaseCharacter.as < prev    next >
Encoding:
Text File  |  2010-11-09  |  11.9 KB  |  343 lines

  1. function ┬º\x01\x02┬º()
  2. {
  3.    return 336 % 511 * 5;
  4. }
  5. var ┬º\x01┬º = -914 + "\x01\x02"();
  6. while(true)
  7. {
  8.    if(eval("\x01") == 766)
  9.    {
  10.       set("\x01",eval("\x01") - 301);
  11.       ┬º┬ºpush(true);
  12.    }
  13.    else if(eval("\x01") == 465)
  14.    {
  15.       set("\x01",eval("\x01") - 183);
  16.       if(function ┬º\x01\x02┬º()
  17.       {
  18.          return 336 % 511 * 5;
  19.       })
  20.       {
  21.          set("\x01",eval("\x01") + 67);
  22.       }
  23.    }
  24.    else if(eval("\x01") == 333)
  25.    {
  26.       set("\x01",eval("\x01") + 391);
  27.       ┬º┬ºpush("\x0f");
  28.    }
  29.    else if(eval("\x01") == 593)
  30.    {
  31.       set("\x01",eval("\x01") + 21);
  32.    }
  33.    else
  34.    {
  35.       if(eval("\x01") == 282)
  36.       {
  37.          set("\x01",eval("\x01") + 67);
  38.          set(┬º┬ºpop(),function ┬º\x01\x02┬º()
  39.          {
  40.             return 336 % 511 * 5;
  41.          } - 24);
  42.          break;
  43.       }
  44.       if(eval("\x01") == 349)
  45.       {
  46.          set("\x01",eval("\x01") + 265);
  47.       }
  48.       else if(eval("\x01") == 614)
  49.       {
  50.          set("\x01",eval("\x01") - 274);
  51.          ┬º┬ºpush("\x0f");
  52.          ┬º┬ºpush(1);
  53.       }
  54.       else if(eval("\x01") == 340)
  55.       {
  56.          set("\x01",eval("\x01") - 7);
  57.          var ┬º┬ºpop() = function ┬º\x01\x02┬º()
  58.          {
  59.             return 336 % 511 * 5;
  60.          };
  61.       }
  62.       else if(eval("\x01") == 724)
  63.       {
  64.          set("\x01",eval("\x01") - 707);
  65.          ┬º┬ºpush(eval(function ┬º\x01\x02┬º()
  66.          {
  67.             return 336 % 511 * 5;
  68.          }));
  69.       }
  70.       else if(eval("\x01") == 17)
  71.       {
  72.          set("\x01",eval("\x01") + 505);
  73.          ┬º┬ºpush(!function ┬º\x01\x02┬º()
  74.          {
  75.             return 336 % 511 * 5;
  76.          });
  77.       }
  78.       else if(eval("\x01") == 522)
  79.       {
  80.          set("\x01",eval("\x01") - 274);
  81.          if(function ┬º\x01\x02┬º()
  82.          {
  83.             return 336 % 511 * 5;
  84.          })
  85.          {
  86.             set("\x01",eval("\x01") - 108);
  87.          }
  88.       }
  89.       else
  90.       {
  91.          if(eval("\x01") != 248)
  92.          {
  93.             if(eval("\x01") == 140)
  94.             {
  95.                set("\x01",eval("\x01") + 236);
  96.                if(!_global.com)
  97.                {
  98.                   _global.com = new Object();
  99.                }
  100.                function ┬º\x01\x02┬º()
  101.                {
  102.                   return 336 % 511 * 5;
  103.                }
  104.                if(!_global.com.evilfree)
  105.                {
  106.                   _global.com.evilfree = new Object();
  107.                }
  108.                ┬º┬ºpop();
  109.                if(!_global.com.evilfree.astroidsRevenge)
  110.                {
  111.                   _global.com.evilfree.astroidsRevenge = new Object();
  112.                }
  113.                ┬º┬ºpop();
  114.                if(!_global.com.evilfree.astroidsRevenge.BaseCharacter)
  115.                {
  116.                   var _loc2_ = com.evilfree.astroidsRevenge.BaseCharacter = function(m, target_mc)
  117.                   {
  118.                      this.mySqrt = Math.sqrt;
  119.                      this.mySin = Math.sin;
  120.                      this.myCos = Math.cos;
  121.                      this.myAtan = Math.atan2;
  122.                      this.radian = 57.29577951308232;
  123.                      this.boundsType = "accAway";
  124.                      this.main = m;
  125.                      this.place_mc(target_mc);
  126.                      this.state = "normal";
  127.                      this.setVariables();
  128.                   }.prototype;
  129.                   _loc2_.adjustVolume = function()
  130.                   {
  131.                   };
  132.                   _loc2_.stopSound = function()
  133.                   {
  134.                   };
  135.                   _loc2_.get_mc = function()
  136.                   {
  137.                      return this.my_mc;
  138.                   };
  139.                   _loc2_.getTargetDistance = function(myTarget)
  140.                   {
  141.                      var _loc2_ = this.getTargetXDistance(myTarget);
  142.                      var _loc3_ = this.getTargetYDistance(myTarget);
  143.                      var _loc4_ = this.mySqrt(_loc2_ * _loc2_ + _loc3_ * _loc3_);
  144.                      return _loc4_;
  145.                   };
  146.                   _loc2_.accelerateToTarget = function()
  147.                   {
  148.                      var _loc3_ = this.targetX - this.xPos;
  149.                      var _loc4_ = this.targetY - this.yPos;
  150.                      var _loc2_ = this.mySqrt(_loc3_ * _loc3_ + _loc4_ * _loc4_);
  151.                      var _loc7_ = this.myAtan(_loc4_,_loc3_) * this.radian;
  152.                      var _loc6_ = this.myCos(_loc7_ / this.radian);
  153.                      var _loc5_ = this.mySin(_loc7_ / this.radian);
  154.                      if(_loc2_ > 50)
  155.                      {
  156.                         this.xSpeed += _loc6_ * this.acceleration;
  157.                         this.ySpeed += _loc5_ * this.acceleration;
  158.                      }
  159.                      else
  160.                      {
  161.                         this.xSpeed += _loc6_ * this.acceleration * (_loc2_ / 50);
  162.                         this.ySpeed += _loc5_ * this.acceleration * (_loc2_ / 50);
  163.                      }
  164.                   };
  165.                   _loc2_.setTarget = function(tX, tY)
  166.                   {
  167.                      this.targetX = tX;
  168.                      this.targetY = tY;
  169.                   };
  170.                   _loc2_.getState = function()
  171.                   {
  172.                      return this.state;
  173.                   };
  174.                   _loc2_.place_mc = function(target_mc)
  175.                   {
  176.                   };
  177.                   _loc2_.setVariables = function()
  178.                   {
  179.                      this.xSpeed = 0;
  180.                      this.ySpeed = 0;
  181.                      this.acceleration = 0;
  182.                      this.friction = 0;
  183.                   };
  184.                   _loc2_.setVelocity = function(xS, yS)
  185.                   {
  186.                      this.xSpeed = xS;
  187.                      this.ySpeed = yS;
  188.                   };
  189.                   _loc2_.setPosition = function(x, y)
  190.                   {
  191.                      this.xPos = x;
  192.                      this.yPos = y;
  193.                   };
  194.                   _loc2_.checkKeys = function()
  195.                   {
  196.                   };
  197.                   _loc2_.getXPos = function()
  198.                   {
  199.                      return this.xPos;
  200.                   };
  201.                   _loc2_.getYPos = function()
  202.                   {
  203.                      return this.yPos;
  204.                   };
  205.                   _loc2_.getXSpeed = function()
  206.                   {
  207.                      return this.xSpeed;
  208.                   };
  209.                   _loc2_.getYSpeed = function()
  210.                   {
  211.                      return this.ySpeed;
  212.                   };
  213.                   _loc2_.applyFriction = function()
  214.                   {
  215.                      this.xSpeed *= this.friction;
  216.                      this.ySpeed *= this.friction;
  217.                   };
  218.                   _loc2_.checkBounds = function()
  219.                   {
  220.                      if(this.boundsType == "accAway")
  221.                      {
  222.                         var _loc2_ = 50;
  223.                         var _loc3_ = 15;
  224.                         if(this.xPos < _loc2_)
  225.                         {
  226.                            var _loc5_ = this.xPos;
  227.                            var _loc4_ = 1 - _loc5_ / _loc2_;
  228.                            this.xSpeed += _loc3_ * _loc4_;
  229.                         }
  230.                         if(this.xPos > this.main.getStageWidth() - _loc2_)
  231.                         {
  232.                            _loc5_ = this.main.getStageWidth() - this.xPos;
  233.                            _loc4_ = 1 - _loc5_ / _loc2_;
  234.                            this.xSpeed -= _loc3_ * _loc4_;
  235.                         }
  236.                         if(this.yPos < _loc2_)
  237.                         {
  238.                            _loc5_ = this.yPos;
  239.                            _loc4_ = 1 - _loc5_ / _loc2_;
  240.                            this.ySpeed += _loc3_ * _loc4_;
  241.                         }
  242.                         if(this.yPos > this.main.getStageHeight() - _loc2_)
  243.                         {
  244.                            _loc5_ = this.main.getStageHeight() - this.yPos;
  245.                            _loc4_ = 1 - _loc5_ / _loc2_;
  246.                            this.ySpeed -= _loc3_ * _loc4_;
  247.                         }
  248.                      }
  249.                      else if(this.boundsType == "freeform")
  250.                      {
  251.                         if(this.main.getMouseDown() == false)
  252.                         {
  253.                            return undefined;
  254.                         }
  255.                         if(this.xPos - this.size / 2 > this.main.getStageWidth())
  256.                         {
  257.                            this.xPos = this.xPos - this.main.getStageWidth() - this.size;
  258.                         }
  259.                         if(this.xPos + this.size / 2 < 0)
  260.                         {
  261.                            this.xPos = this.xPos + Stage.width + this.size;
  262.                         }
  263.                         if(this.yPos - this.size / 2 > this.main.getStageHeight())
  264.                         {
  265.                            this.yPos = this.yPos - this.main.getStageHeight() - this.size;
  266.                         }
  267.                         if(this.yPos + this.size / 2 < 0)
  268.                         {
  269.                            this.yPos = this.yPos + Stage.height + this.size;
  270.                         }
  271.                      }
  272.                      else if(this.boundsType == "bounce")
  273.                      {
  274.                         if(this.xPos + this.size / 2 > Stage.width)
  275.                         {
  276.                            this.xPos = Stage.width - this.size / 2;
  277.                            this.xSpeed = - this.xSpeed;
  278.                         }
  279.                         if(this.xPos - this.size / 2 < 0)
  280.                         {
  281.                            this.xPos = this.size / 2;
  282.                            this.xSpeed = - this.xSpeed;
  283.                         }
  284.                         if(this.yPos + this.size / 2 > Stage.height)
  285.                         {
  286.                            this.yPos = Stage.height - this.size / 2;
  287.                            this.ySpeed = - this.ySpeed;
  288.                         }
  289.                         if(this.yPos - this.size / 2 < 0)
  290.                         {
  291.                            this.yPos = this.size / 2;
  292.                            this.ySpeed = - this.ySpeed;
  293.                         }
  294.                      }
  295.                   };
  296.                   _loc2_.addXSpeed = function(n)
  297.                   {
  298.                      this.xSpeed += n;
  299.                   };
  300.                   _loc2_.addYSpeed = function(n)
  301.                   {
  302.                      this.ySpeed += n;
  303.                   };
  304.                   _loc2_.destroy = function()
  305.                   {
  306.                      this.my_mc.removeMovieClip();
  307.                   };
  308.                   _loc2_.getTargetXDistance = function(bChar)
  309.                   {
  310.                      var _loc2_ = bChar.getXPos() - this.xPos;
  311.                      return _loc2_;
  312.                   };
  313.                   _loc2_.getTargetYDistance = function(bChar)
  314.                   {
  315.                      var _loc2_ = bChar.getYPos() - this.yPos;
  316.                      return _loc2_;
  317.                   };
  318.                   _loc2_.animate = function()
  319.                   {
  320.                      this.checkKeys();
  321.                      this.checkBounds();
  322.                      this.xPos += this.xSpeed;
  323.                      this.yPos += this.ySpeed;
  324.                      this.applyFriction();
  325.                      this.my_mc._x = this.xPos;
  326.                      this.my_mc._y = this.yPos;
  327.                   };
  328.                   ┬º┬ºpush(ASSetPropFlags(com.evilfree.astroidsRevenge.BaseCharacter.prototype,null,1));
  329.                }
  330.                ┬º┬ºpop();
  331.                break;
  332.             }
  333.             if(eval("\x01") == 376)
  334.             {
  335.                set("\x01",eval("\x01") - 376);
  336.             }
  337.             break;
  338.          }
  339.          set("\x01",eval("\x01") - 108);
  340.       }
  341.    }
  342. }
  343.